package cn.xiaok.springboot.mapper;

import cn.xiaok.springboot.entity.User;
import com.baomidou.dynamic.datasource.annotation.DS;
import org.springframework.stereotype.Service;

/**
 * @author xueqian.shi
 * @date 2020/9/19
 */
//@Repository,@Service,@Mapper//这三注解都可以的
// 既然是mapper，我还是用Mapper吧
// 但是@Autowired 的时候，提示Could not autowire. No beans of 'UserMapperDB2' type found
// 所以我又换回来了  @Service
@Service
public interface UserMapper {
    @DS("db1")
    User find(int id);
}
